<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	String id = request.getParameter("id");
	if (id == null) {
		id = "";
	}
%>
<script type="text/javascript">
$(function(){
		$('#storelist').combotree({
			url : '${ctx}/autoinn/store/sellist',
			idFiled : 'id',
			textFiled : 'name'
			
		});
		
		$('#pathlist').combotree({
			url : '${ctx}/autoinn/path/treegrid',
			idFiled : 'id',
			textFiled : 'text',
			parentField : 'pid',
			lines : true
		});
		
	<% if(id!=""){%>

	 $.post('${ctx}/autoinn/product/update/pro/ser?id=' +$(':input[name="id"]').val(), {
			id : $(':input[name="id"]').val(),
		}, function(result) {
			if (result.id != undefined) {
				//alert(result.status+" 和"+result.remarks+"还有"+result.sort);
				$('form').form('load', {
				
					'id' : result.id,
					'proname' :result.proname,
					'path' : result.path,
					'yprice' : result.yprice,
					'xprice' : result.xprice,
					'store_id' :result.store_id
 					
				});
			 //alert(result.lid);
				//$('#iconCls').attr('class', result.iconCls);//设置背景图标
			}
			$.messager.progress('close');
		}, 'json');
	 
<%}%>
}); 		
</script>
<div align="center" id="dil">
	<form id="product_updateForms" method="post" class="zzld_form">

		<input type="hidden" name="id" value="<%=id %>" /> <br />
		<table class="zzld_table" style="width: 100%">
			<tr>
				<th>商品：</th>
				<td><input name="proname" value=""
					class="easyui-validatebox" data-options="required:true"
					missingMessage="请编辑商品!" style="width: 98%;" /></td>
				<th>门店:</th>
				<td><input id="storelist" name="store_id"
					class="easyui-combotree" style="width: 155px;" /></td>
			</tr>
			<tr>
				<th>商品分类:</th>
				<td><input id="pathlist" name="path"
					class="easyui-combotree" style="width: 155px;" /></td>
			</tr>
			<tr>

				<th>原价:</th>
				<td><input name="yprice" value=""
					class="easyui-validatebox" data-options="required:true"
					missingMessage="请填写原价!" style="width: 73%;" /></td>
				<th>现价:</th>
				<td><input name="xprice" value=""
					class="easyui-validatebox" style="width: 73%;" />
		</table>

	</form>
</div>